package cn.hd01.repository.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

@Entity
@Table(name = "c_order_payment")
@JsonInclude(Include.NON_NULL)
public class COrderPayment {
	@Id
	@GeneratedValue
	private Integer id;
	
	private Integer orderId;
	
	private String type;
	
	private String payType;
	
	private String payee;
	
	private BigDecimal amount;
	
	private BigDecimal feeAmount;
	
	private String isBalance;
	
	private BigDecimal distributorRebate;
	
	private BigDecimal recommDistributorRebate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date payTime;
	
	private Date createTime = new Date();
	
	private Date updateTime = new Date();
	
	@Transient
	private String payTimeBeginTime;

	@Transient
	private String payTimeEndTime;
	
	@Transient
	private String desc;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public String getPayee() {
		return payee;
	}

	public void setPayee(String payee) {
		this.payee = payee;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getPayTimeBeginTime() {
		return payTimeBeginTime;
	}

	public void setPayTimeBeginTime(String payTimeBeginTime) {
		this.payTimeBeginTime = payTimeBeginTime;
	}

	public String getPayTimeEndTime() {
		return payTimeEndTime;
	}

	public void setPayTimeEndTime(String payTimeEndTime) {
		this.payTimeEndTime = payTimeEndTime;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public BigDecimal getFeeAmount() {
		return feeAmount;
	}

	public void setFeeAmount(BigDecimal feeAmount) {
		this.feeAmount = feeAmount;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getIsBalance() {
		return isBalance;
	}

	public void setIsBalance(String isBalance) {
		this.isBalance = isBalance;
	}

	public BigDecimal getDistributorRebate() {
		return distributorRebate;
	}

	public void setDistributorRebate(BigDecimal distributorRebate) {
		this.distributorRebate = distributorRebate;
	}

	public BigDecimal getRecommDistributorRebate() {
		return recommDistributorRebate;
	}

	public void setRecommDistributorRebate(BigDecimal recommDistributorRebate) {
		this.recommDistributorRebate = recommDistributorRebate;
	}
}
